<?php
use yii\helpers\Html;
use yii\helpers\Url;
/* @var $this yii\web\View */
$this->title = '找回登录密码';
?>
<section id="body_h">
		<div class='modular13'>
			<div class="modular12-con1from">
				<form action="<?= Url::to(['site/forgotinvestfinish']);?>" method="post">
                <input type ="hidden" name="_csrf" value="<?php echo yii::$app->request->getCsrfToken();?>" />
					<p class="oneelement greenborder"><input name="password" class="changeelement" placeholder="请输入 6-16 位密码，不要与投资密码相同" type="password"></p>
					<p class="oneelement greenborder"><input name="qrpassword" class="changeelement" placeholder="请重复输入新密码" type="password"></p><br>
					<p class="mould-2bot form-ok"><input class="form-okbtn b-f" type="submit" value="完成"></p>
				</form>
			</div>
		</div>
	<section class='modular12-con1ts2 text-c'>
			<p>如有任何疑问，请拨打客服电话 <span class="bluecolor">4006-900-880</span> <br>工作时间：09：00-17：30</p>
		</div>
		<div class="footer-h"></div>
	</section>
	<section id="footer">
		<ul class="footer-nav clearfix">
		    <li class="current-bot">
		        <a href="<?= Url::to('main');?>">
		            <img src="<?= Yii::getAlias('@web') . '/' ?>images/footer1-on.png" alt="">
		            首页
		        </a>
		    </li>
		    <li>
		        <a href="<?= Url::to('member');?>">
		            <img src="<?= Yii::getAlias('@web') . '/' ?>images/footer2.png" alt="">
		            我的账户
		        </a>
		    </li>
		    <li>
		        <a href="<?= Url::to(['company/about']);?>">
		            <img src="<?= Yii::getAlias('@web') . '/' ?>images/footer3.png" alt="">
		            关于我们
		        </a>
		    </li>
		</ul>
	</section>
	<p id="tip-error"><span>表单验证错误信息</span></p>
<script src="<?= Yii::getAlias('@web') . '/' ?>js/reset.js"></script>
<script>
	$(function($) {
	    var UA=window.navigator.userAgent;  //使用设备
	    var CLICK="click";
	    if(/ipad|iphone|android/.test(UA)){   //判断使用设备
	        CLICK="tap";
	    }
		$(".form-okbtn").click(function(event){
            event.preventDefault();
            var password=$("input[name='password']").val();
            var qrpassword=$("input[name='qrpassword']").val();
            	reg1 = /^[a-zA-Z\d]{6,16}$/;
        	if(password == false){
				$('#tip-error span').html('密码不能为空');
		        $('#tip-error').show();
		        setTimeout(function(){$('#tip-error').fadeOut(500);},1600);
        		$("input[name='password']").focus();
        	}else if(!reg1.test(password)){
        		$('#tip-error span').html('请输入6-16位密码');
		        $('#tip-error').show();
		        setTimeout(function(){$('#tip-error').fadeOut(500);},1600);
		        $("input[name='password']").focus();
			}else if(password != qrpassword){
        		$('#tip-error span').html('密码输入不一致');
		        $('#tip-error').show();
		        setTimeout(function(){$('#tip-error').fadeOut(500);},1600);
			}else{
				$(this).parents("form").submit();
			}
		});
		$(".bodyA").hide();
	});
</script>